package com.gx.server.model.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gx.server.model.domain.User;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author Dobby
 * @version 1.0
 */
public interface UserService extends IService<User> {



    /**
     * 用户注册
     *
     * @param userAccount   用户账户
     * @param userPassword  用户密码
     * @return 新用户 id
     */
    User userRegister(String userAccount, String userPassword, String userEmail, String authCode);

    /**
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @param request
     * @return
     */
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);


    /**
     * 更新用户信息
     * @return
     */
    boolean updateUser(Long loginUser_id, User newUser);


    User userById(Long userId);
}
